package org.mdrtwell.annotation;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

@AnnotationTest(value = "asf", character = "ddd")
public class AnnotationUsage {
	@Deprecated
	@SuppressWarnings("unchecked")
	public void tet() {
		System.out.println("hello !");
	}

	public static void main(String[] args) {
		// AnnotationUsage usage = new AnnotationUsage();
		// usage.tet();
		Method method;
		try {
			method = AnnotationUsage.class.getMethod("tet", new Class[] {});
			Annotation[] ats = method.getDeclaredAnnotations();
			for (Annotation annotation : ats) {
				System.out.println(annotation.annotationType().getName());
			}
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
